﻿using Bmz.Studio.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bmz.Studio.EntityFramework.Mapping
{
    public class DictionaryMap : StudioEntityTypeConfiguration<Dictionary>
    {
        public DictionaryMap()
        {
            this.HasKey(p=>p.Id);
            this.Property(p => p.ParentId).IsOptional();
            this.Property(p => p.Code).HasMaxLength(10).IsRequired();
            this.Property(p => p.Type).HasMaxLength(10).IsRequired();
            this.Property(p => p.Name).HasMaxLength(20).IsRequired();
            this.Property(p => p.Description).HasMaxLength(200);
        }
    }
}
